import VueRouter from 'vue-router'
import Vue from 'vue'


import Discover from '../components/Discover.vue'
import Toplist from '../components/Toplist.vue'
import Songlist from '../components/Songlist.vue'

import My from "../components/My.vue"
import Product from "../components/Product.vue"

import Friends from "../components/Friends.vue"

Vue.use(VueRouter)

const router = new VueRouter({
    routes:[
        {
            path:'/discover',component:Discover,
            children:[
                {path:'/discoer/toplist',component:Toplist},
                {path:'/discoer/songlist',component:Songlist},
            ]
        },
        {
            path:'/my',component:My,
            children:[
                {path:"/my/product/:id",component:Product,props:true}
            ]
        },
        {path:'/friends',component:Friends},
    ]
})

export default router